/**welcome.jsp页面调用
 * 表格
 * 
 */
 	Ext.onReady(function() {
   var xg = Ext.grid;
	var readerbg = new Ext.data.JsonReader({
		fields : ['F_NB_XUHAO', 'F_VC_FBSJ', 'F_VC_BANH','F_VC_BIAOTI','F_VC_BEIZ']
	});
    var urlP = basePath+'JarpListener?className=com.jsepc.jhtj.cps.project.ProjManager' +
					'&methodName=getwelcome&paramCount=0';
//	alert(urlP);				
	var storebg = new Ext.data.Store({
		proxy : new Ext.data.HttpProxy({
			url : urlP
		}),
		reader : readerbg
	});
	storebg.load();
//	alert(readerbg);
	var expander = new xg.RowExpander({
        tpl : new Ext.Template(
        	'<p>&nbsp;</p>',
        	'<p>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp {F_VC_BEIZ}</p>',
//       		('{LOGSX}'!=''?'<p>填写意见:{LOGSX}</p>':''),
       		'<p>&nbsp;</p>'
        )
    });
	
	var cm = new xg.ColumnModel([	
	expander,
		{
		id : 'F_NB_XUHAO',
		hidden:true,
		header : "序号",
		align : 'center',
		width : 100,
		dataIndex : 'F_VC_CZRQ'
	},{
		id : 'F_VC_FBSJ',
		header : "时间",
		align : 'center',
		width : 150,
		dataIndex : 'F_VC_FBSJ'
	}, {
		id : 'F_VC_BANH',
		header : "版本号",
		align : 'center',
		width : 150,
		dataIndex : 'F_VC_BANH'
	}, {
		id : 'F_VC_BIAOTI',
		header : "标题",
		align : 'center',
		width : 250,
		dataIndex : 'F_VC_BIAOTI'
	}
	]);
	cm.defaultSortable = true;
	var gd_item = new xg.GridPanel({
		id : 'gd_item',
		 title:'公告信息',
		store : storebg,
//		frame:true,
		cm : cm,
		width : 510,
		height: 420,
        viewConfig: {
            forceFit:true
        },
        plugins: expander,
        collapsible: false,
        animCollapse: false,
		iconCls : 'icon-grid',
		renderTo: 'grid1',
		stripeRows : true
	});
	
	gd_item.on('rowdblclick', rowdblclick_welcome);
	function rowdblclick_welcome(grid, rowindex, e) {
		var re =gd_item.getSelectionModel().getSelections();
//		alert(re[0].data.F_VC_FBSJ);
	expander.expandRow(rowindex);

	}
	});